<div id="content-box">


	<h3><?php __('Danh sách thành viên');?></h3>
     <div class="buttons"><?php echo $html->link('Thêm mới', array('action' => 'add'),array('class' =>'add_icon','title' =>
    'Thêm thành viên', 'onclick' => "Modalbox.show(this.href, {title: this.title, width: 375}); return false;"));?>
    </div>
	<table id='tables' cellpadding="0" cellspacing="0" class="tablecolors" align="center">
	<tr>
            <th><?php echo $this->Paginator->sort('STT', 'id');?></th>
			<th><?php echo $this->Paginator->sort('Tài khoản','username');?></th>
			<th><?php echo $this->Paginator->sort('email');?></th>
			<th><?php echo $this->Paginator->sort('created');?></th>
			<th><?php echo $this->Paginator->sort('Giới tính','gender');?></th>
                      
			<th colspan="3"><?php __('Thao tác');?></th>
	</tr>
	<?php
	$i = 0;
	foreach ($nhanvien as $nhanvien):
	?>
	<tr>
                <td align="center"><?php echo $nhanvien['Nhanvien']['id']; ?>&nbsp;</td>
		<td><?php echo $nhanvien['Nhanvien']['masonv']; ?>&nbsp;</td>
		<td><?php echo $nhanvien['Nhanvien']['emailnv']; ?>&nbsp;</td>
		<td><?php echo  date('d/m/Y', strtotime($nhanvien['Nhanvien']['ngaysinhnv'])); ?>&nbsp;</td>
               
                <td align="center">
                    <?php if($nhanvien['Nhanvien']['phainv']==1) echo "Nữ";
                  else if($nhanvien['Nhanvien']['phainv'] == 0) echo 'Nam'; 
                  else echo "giới tính khác";?> 
                </td>
                
	<td>
			<?php 	echo $html->link('View', array('action' => 'view', $Nhanvien['Nhanvien']['id']),
		array('class' => 'view_icon', 'title' => 'Thông tin tài khoản', 'onclick' =>
		"Modalbox.show(this.href, {title: this.title, width: 400}); return false;")); ?>
        </td>
<td>
            <?php 	echo $html->link('Edit', array('action' => 'edit', $Nhanvien['Nhanvien']['id']),
		array('class' => 'edit_icon', 'title' => 'Cập nhật thông tin', 'onclick' =>
		"Modalbox.show(this.href, {title: this.title, width: 400}); return false;")); ?></td>
<td>			<?php 	echo $this->Html->link(__('Delete', true), array('action' => 'delete',
		$nhanvien['Nhanvien']['id']), array('class' => 'del_icon'), sprintf(__('Are you sure you want to delete # %s?', true),
		$nhanvien['Nhanvien']['id'])); ?>
		</td>
	</tr>
<?php endforeach; ?>
	</table>
	

<div class="paging">
		<?php echo $this->Paginator->prev('<< ' . __('Lùi', true), array(), null, array('class'=>'disabled'));?>
	 | 	<?php echo $this->Paginator->numbers();?>
 |
		<?php echo $this->Paginator->next(__('Tới', true) . ' >>', array(), null, array('class' => 'disabled'));?>
        
	</div>
</div>
